#include "SnakerUtils.h"
using namespace std;

TimeCounter::TimeCounter() {
    _time_start = clock();
}
clock_t TimeCounter::Start() {
    return _time_start = clock();
}
clock_t TimeCounter::Read() {
    return clock() - _time_start;
}

Randomizer::Randomizer() {
    srand(seed);
}
Randomizer::Randomizer(int seed) : seed(seed) {
    srand(seed);
}

int Randomizer::glob_rand() {
    return rand();
}

int dim(int a, int b) {
    return (int)floor((double)a / (double)b);
}
int mdim(int a, int b) {
    return a - (b * dim(a, b));
}

